The theory behind CVA

Class means

  • The means() function allows the user to make adjustments to the points representing the class means

Plotting only a selection of the class means

The which argument allows the user to indicate which of the class means should be displayed in the biplot.

biplot(state.x77) |> CVA(state.region) |> means(which = c(2,3),label = TRUE) |> plot()

Colours and characters for the points

The following arguments control the aesthetic options for the plotted class mean points:

  • col: the colours for the points

  • pch: the plotting characters for the points

  • cex: the character size for the points

  • opacity: the transparency of the points

  • shade.darker: a TRUE or FALSE value indicating whether the points should be a shade darker than the samples

biplot(state.x77) |> CVA(state.region) |> means(cex = c(1,2,3,4),col = "red",pch = c(9,13,4,16)) |> plot()

Labels

The following arguments control the aesthetic options for the labels accompanying the plotted class mean points:

  • label: a TRUE or FALSE value indicating whether labels are displayed

  • label.col: the colours for the labels

  • label.cex: the character size for the labels

  • label.side: the side at which the label appears

  • label.offset: the offset of the label

biplot(state.x77) |> CVA(state.region) |> means(label = TRUE,label.side = "top",label.offset = 2,label.cex = 1) |> plot()

Classification regions

This function creates classification regions for the CVA biplot

The classify() function appends the biplot object with the following elements:

  • A confusion matrix from the classification into classes

  • The classification accuracy rate

  • A logical value indicating whether classification regions are shown in the biplot

  • A list of chosen aesthetics for the classification regions

  • The midpoints of the classification regions

Classification regions in the CVA biplot

class.examp<-biplot(state.x77) |> CVA(state.region) |> classify(col = c("cornflowerblue","darkolivegreen3","darkgoldenrod","aquamarine"))
#class.examp$classify
class.examp |> plot()

Bags containing a percentage of observations

This function creates \(\alpha\)-bags

The alpha.bags() function appends the biplot object with the following elements:

  • A list of coordinates for the \(\alpha\)-bags for each group

  • A vector of colours for the \(\alpha\)-bags

  • A vector of line types for the \(\alpha\)-bags

  • A vector of line widths for the \(\alpha\)-bags

The alpha-bags in the CVA biplot

ab.examp<-biplot(state.x77) |> CVA(state.region) |> alpha.bags(alpha = c(0.85,0.9,0.95,0.99),lty = c(1,2,3,4))
# Computing 0.85 -bag for Northeast 
# Computing 0.9 -bag for South 
# Computing 0.95 -bag for North Central 
# Computing 0.99 -bag for West
#ab.examp$alpha.bags
ab.examp |> plot()

Concentration ellipses

This function creates \(\kappa\)-ellipses

The ellipses() function appends the biplot object with the following elements:

  • A list of coordinates for the \(\kappa\)-ellipses for each group

  • A vector of colours for the \(\kappa\)-ellipses

  • A vector of line types for the \(\kappa\)-ellipses

  • A vector of line widths for the \(\kappa\)-ellipses

  • A vector of \(\alpha\) values

The concentration ellipses in the CVA biplot

kc.examp<-biplot(state.x77) |> CVA(state.region) |> ellipses(alpha = c(0.85,0.9,0.95,0.99),lwd = c(1,2,3,4))
# Computing 1.95 -ellipse for Northeast 
# Computing 2.15 -ellipse for South 
# Computing 2.45 -ellipse for North Central 
# Computing 3.03 -ellipse for West
#kc.examp$conc.ellipses
kc.examp |> plot()

Measuring fit of CVA

Summary measures for CVA

Rotate and reflect

Zooming in

One dimensional biplots

Three dimensional biplots

The dim.biplot argument can be set to 3 to allow the user to create a 3D biplot. The plot() function makes use of the RGL device for the 3D display.

biplot(iris) |> CVA(classes = iris[,5],dim.biplot = 3) |> means(col = "red") |> plot()